home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_07 / plauger / isptback.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-03  |  270 b   |  15 lines

  1. // isputback -- istream::putback(char)
  2. #include <istream>
  3.  
  4. istream& istream::putback(char c)
  5.     {    // put back a char
  6.     _Chcount = 0;
  7.     _TRY_IO_BEGIN
  8.     if (ipfx(1) && rdbuf()->sputbackc(c) == EOF)
  9.         setstate(badbit);
  10.     isfx();
  11.     _CATCH_IO_END
  12.     return (*this);
  13.     }
  14.  
  15.